package com.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

@Data
@TableName(value = "bl_category")
@ApiModel(value = "文章分类表")
public class Category {

    @TableId(type = IdType.AUTO)
    Long categoryId;

    @NotEmpty(message = "分类名称不能为空")
    @ApiModelProperty("分类名称")
    String title;

    @ApiModelProperty("创建时间")
    Integer createTime;

    @ApiModelProperty("描述")
    String description;

    @TableField(exist = false)
    Integer articleNum;
}
